<!DOCTYPE html>
<html lang="en">
	<head>
		<include file="Index/head" />
		<style type="text/css">
		.col-sm-9{ padding-top: 4px;}
		</style>
	</head>

	<body>
		<include file="Index/header" />

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<include file="Index/menu" />
				
				<div class="main-content">
					<include file="Index/nav" />

					<div class="page-content">
						
							<!-- /**
							 * 右侧页面begin
							 */ -->
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

								<form class="form-horizontal" role="form" action="{:U('Admin/Product/set_package')}" method="POST" >
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 分类名: </label>
										<div class="col-sm-9">
											<label>{$classify_name}</label>
										</div>
									</div>
									<input type="text" name="classify_id" value="{$classify_id}" hidden="hidden">
 									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 检测套餐: </label>
											<div class="col-sm-5" >
											<volist name="package_lists" id="vo">
												<label style="margin-right:30px;"> 
												<input name="package_id[]" type="checkbox" class="ace" value="{$vo.id}" <if condition="$vo.checked eq 1"> checked="checked" </if> >
												<span class="lbl">{$vo.name}</span>
												</label>
											</volist>
											</div>
									</div>
									<div class="space-4"></div>
								
									<div class="clearfix form-actions">
										<div class="col-md-offset-3 col-md-9">
											<button class="btn btn-info" type="submit">
												<i class="icon-ok bigger-110"></i>
												保存
											</button>									
										&nbsp; &nbsp; &nbsp;
										<a href="{:U('Admin/Product/classify_lists')}">
											<button class="btn" type="button">
												<i class="icon-undo bigger-110"></i>
												返回
											</button>
										</a>
											
										</div>
									</div>

									<div class="hr hr-24"></div>

									</div><!-- /row -->

								</form>

						</div>
							<!-- /**
							 * 右侧页面end
							 */ -->
					</div><!-- /.page-content -->
				</div>

			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<include file="Index/footer" />
		<script type="text/javascript">
		$(document).ready(function(){
			$("#classify").change(function(){
				$("#classify_son").empty();
				var id=$("#classify").val();
				var url="{:U('Admin/System/ready_classify')}"
				$.ajax({
					type:'post',
					url:url,
					data:{id:id},
					dataType:'json',
					success: function(data){
						var str='';
						$.each(data,function(k,v){
							str+='<label style="margin-right:20px;" ><input name="classify_son[]" type="checkbox" class="ace" value="'+ v['id'] + '" >';
							str+='<span class="lbl">'+ v['name'] +'</span></label>'

						});

						$("#classify_son").append(str);
					}
				});
			});
		});
		</script>
	</body>
</html>
